package com.bw.database.db

import androidx.room.AutoMigration
import androidx.room.Database
import androidx.room.RoomDatabase
import com.bw.database.dao.UserInfoDao
import com.bw.database.entity.UserInfoEntity

/**
 *版本升级是对于二次安装的时候进行数据库升级
 */
@Database(
    entities = [UserInfoEntity::class],  //表实体
    exportSchema = false,                //是否支持数据库导出协议（不让外部程序访问）
    version = 1 ,                         //版本号
//    autoMigrations = [
//        AutoMigration(from = 1, to = 2, spec = UserInfoAutoMigration::class),
//        AutoMigration(from = 2, to = 3, spec = UserInfoColumnAutoMigration::class)
//    ]  //数据库升级策略配置
)
abstract class AppDataBase:RoomDatabase() {
    abstract fun getUserInfoDao():UserInfoDao

}